#ifndef CONTAINERNODE_H
#define CONTAINERNODE_H
//Begin section for file ContainerNode.h
//TODO: Add definitions that you want preserved
//End section for file ContainerNode.h
#include "DisplayNode.h"
static const int POSX=0x1;
static const int POSY=0x2;
static const int AXISX=0x4;
static const int AXISY=0x8;
static const int SCALEX=0x10;
static const int SCALEY=0x20;
static const int SKEWX=0x40;
static const int SKEWY=0x80;
static const int ANGLE=0x100;
static const int ALPHA=0x200;
static const int VISIBLE=0x400;
static const int ALL=0x7ff;

class XMLManager;


//@generated "UML to C++ (com.ibm.xtools.transform.uml2.cpp.CPPTransformation)"
class  SCENEDATA_EXPORT ContainerNode : public DisplayNode
{

    //Begin section for ContainerNode
    //TODO: Add attributes that you want preserved
    //End section for ContainerNode
protected:
		static int SymbolCount;
		int symbolID;
        PropertyNode * Visible;
		QVector<DisplayNode *> children;
    public:
		virtual bool IsAtomic()const{return false;}
		virtual QString GetNodeName(){ if(name.size())return DisplayNode::GetNodeName();return QString("Symbol")+QString::number(symbolID,36);}
        //@generated "UML to C++ (com.ibm.xtools.transform.uml2.cpp.CPPTransformation)"
		int SymbolID()const{return symbolID;}

		virtual void CopyProperty(DisplayNode* ref);

        //@generated "UML to C++ (com.ibm.xtools.transform.uml2.cpp.CPPTransformation)"
        ContainerNode(); 



        //@generated "UML to C++ (com.ibm.xtools.transform.uml2.cpp.CPPTransformation)"
        ContainerNode(const ContainerNode & arg); 



        //@generated "UML to C++ (com.ibm.xtools.transform.uml2.cpp.CPPTransformation)"
        virtual ~ContainerNode(); 



        //@generated "UML to C++ (com.ibm.xtools.transform.uml2.cpp.CPPTransformation)"
        virtual void AddChildren(DisplayNode * np,int index=-1); 



        //@generated "UML to C++ (com.ibm.xtools.transform.uml2.cpp.CPPTransformation)"
        void RemoveChildrenAt(int index); 
		void ReplaceChildrenAt(int index,DisplayNode * another);
		
		DisplayNode * PopChildrenAt(int index);
		DisplayNode * ChildrenAt(int index);
		void Swap(int i1,int i2);
        //@generated "UML to C++ (com.ibm.xtools.transform.uml2.cpp.CPPTransformation)"
        int IndexOf(DisplayNode * np); 

		int ChildrenCount()const{return children.size();}


        //@generated "UML to C++ (com.ibm.xtools.transform.uml2.cpp.CPPTransformation)"
        QVector<int> GetChildrenUnderPoint(QPointF pt); 



        //@generated "UML to C++ (com.ibm.xtools.transform.uml2.cpp.CPPTransformation)"
        int  GetChildUnderPoint(QPointF pt); 

		void SetPosX(double x,int time=0,Ease::EaseType type=Ease::ALLStart){PosX->SetValue(time,x,type);dirty=true;}
		void SetPosY(double y,int time=0,Ease::EaseType type=Ease::ALLStart){PosY->SetValue(time,y,type);dirty=true;}
		void SetScaleX(double x,int time=0,Ease::EaseType type=Ease::ALLStart){ScaleX->SetValue(time,x,type);dirty=true;}
		void SetScaleY(double y,int time=0,Ease::EaseType type=Ease::ALLStart){ScaleY->SetValue(time,y,type);dirty=true;}
		void SetAxisX(double x,int time=0,Ease::EaseType type=Ease::ALLStart){AxisX->SetValue(time,x,type);dirty=true;}
		void SetAxisY(double y,int time=0,Ease::EaseType type=Ease::ALLStart){AxisY->SetValue(time,y,type);dirty=true;}
		void SetSkewX(double x,int time=0,Ease::EaseType type=Ease::ALLStart){SkewX->SetValue(time,x,type);dirty=true;}
		void SetSkewY(double y,int time=0,Ease::EaseType type=Ease::ALLStart){SkewY->SetValue(time,y,type);dirty=true;}
		void SetAngle(double a,int time=0,Ease::EaseType type=Ease::ALLStart){RotationAngle->SetValue(time,a,type);dirty=true;}
		void SetAlpha(double a,int time=0,Ease::EaseType type=Ease::ALLStart){Alpha->SetValue(time,a,type);dirty=true;}		
		void SetVisible(double a,int time=0,Ease::EaseType type=Ease::ALLStart);

		

		double GetPosX(int time)const{return PosX->ValueOnCurrentTime(time);}
		double GetPosY(int time)const{return PosY->ValueOnCurrentTime(time);}
		double GetScaleX(int time)const{return ScaleX->ValueOnCurrentTime(time);}
		double GetScaleY(int time)const{return ScaleY->ValueOnCurrentTime(time);}
		double GetAxisX(int time)const{return AxisX->ValueOnCurrentTime(time);}
		double GetAxisY(int time)const{return AxisY->ValueOnCurrentTime(time);}
		double GetSkewX(int time)const{return SkewX->ValueOnCurrentTime(time);}
		double GetSkewY(int time)const{return SkewY->ValueOnCurrentTime(time);}
		double GetAngle(int time)const{return RotationAngle->ValueOnCurrentTime(time);}
		double GetAlpha(int time)const{return Alpha->ValueOnCurrentTime(time);}
		double GetVisible(int time)const{return Visible->ValueOnCurrentTime(time);}
		Ease::EaseType GetPosXEase(int time)const{return PosX->EaseOnCurrentTime(time);}
		Ease::EaseType GetPosYEase(int time){return PosY->EaseOnCurrentTime(time);}
		Ease::EaseType GetScaleXEase(int time)const{return ScaleX->EaseOnCurrentTime(time);}
		Ease::EaseType GetScaleYEase(int time)const{return ScaleY->EaseOnCurrentTime(time);}
		Ease::EaseType GetAxisXEase(int time)const{return AxisX->EaseOnCurrentTime(time);}
		Ease::EaseType GetAxisYEase(int time)const{return AxisY->EaseOnCurrentTime(time);}
		Ease::EaseType GetSkewXEase(int time)const{return SkewX->EaseOnCurrentTime(time);}
		Ease::EaseType GetSkewYEase(int time)const{return SkewY->EaseOnCurrentTime(time);}
		Ease::EaseType GetAngleEase(int time)const{return RotationAngle->EaseOnCurrentTime(time);}
		Ease::EaseType GetAlphaEase(int time)const{return Alpha->EaseOnCurrentTime(time);}
		Ease::EaseType GetVisibleEase(int time)const{return Visible->EaseOnCurrentTime(time);}
		QVector<int > getKeyFrames(int flags)const;
		void removeKeyFrames(int flags,int time);
		virtual void UpdateCache ();
		virtual bool IsPointIn(double PosX,double PosY)const;
		friend class Translator;
		friend class XMLManager;
};  //end class ContainerNode



#endif
